package com.cloud.user_info.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cloud.user_info.entity.SysProjectRole;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 项目与角色关联表
 *
 * @author yzj
 */
@Mapper
public interface SysProjectRoleMapper extends BaseMapper<SysProjectRole> {

    /**
     * 查询项目与角色关联信息
     */
    public SysProjectRole selectProjectRole(@Param("param") SysProjectRole param);

    /**
     * 根据角色ID查询关联项目个数
     *
     * @param roleId
     * @return
     */
    public int countProjectRoleId(@Param("roleId") Long roleId);

    /**
     * 根据角色ID批量取消用户授权
     *
     * @param roleIds
     * @return
     */
    public int deleteProjectRole(@Param("roleIds") List<Long> roleIds);

}
